package com.fanketly.musicdiary.data.db

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent

@Module
@InstallIn(SingletonComponent::class)
object DaoModule {
    /**
     *tell dependency injection how to implement this class
     **/
    @Provides
    fun providesDiaryDao(
        database: DiaryDatabase,
    ): DiaryDao = database.diaryDao()

    @Provides
    fun providesMusicDao(
        database: DiaryDatabase,
    ): MusicDao = database.musicDao()
}